#pragma once

#include <string>
#include "StockWorker.h"
#include "Indexer.h"

using std::wstring;

class Stock
{
	StockWorker _stock_worker;
	Indexer _indexer;
public:
	Stock( void );
	Stock( const wchar_t* FileName );
	Stock( const wstring& FileName );

	~Stock( void );

	void assign( const wchar_t* FileName );
	void assign( const wstring& FileName );

	Record read( int id );
	void write( const Record& rec );

	void clear( void );

	void close( void );
};